import { getAction, deleteAction, putAction, postAction, downFile, downFilePost } from '@/api/manage'

const serviceName = '/special'
//刑满释放人员-导入表格数据
export const releaseImportUrl = `/releasePrison/importExcel`
//社区矫正人员-导入表格数据
export const correctionImportUrl = `/xl-community-correction-info/importExcel`
//吸毒人员-导入表格数据
export const poisonImportUrl = `/drug/importExcel`
//艾滋病危险人员-导入表格数据
export const aidsImportUrl = `${serviceName}/aids/importExcel`
//肇事肇祸等严重精神障碍患者-导入表格数据
export const spiritualityImportUrl = `/mental_disorder/importExcel`
//重点青少年-导入表格数据
export const youthImportUrl = `/key-youth/importExcel`

//刑满释放人员
const getListRelease = (params) => getAction(`/releasePrison/list`, params)
const getInfoRelease = (params) => getAction(`/releasePrison/information/`+params)
const getEducationInfoRelease = (params) => getAction(`/releasePrison/educationInfo/`+params)
const exportRelease = (params) => downFile(`/releasePrison/exportExcel`, params)
// const getTemplateRelease = (params) => getAction(`/releasePrison/importTemplate`, params)
const getTempletExcel= params => downFile(`/excel/getExcel`,params)
//社区矫正人员
const getListCorrection = (params) => getAction(`/xl-community-correction-info/list`, params)
const getInfoCorrection = (params) => getAction(`/xl-community-correction-info/information/`+params)
const getCommunityCorrectionInfo = (params) => getAction(`/xl-community-correction-info/communityCorrectionInfo/`+params)
const exportCorrection = (params) => downFile(`/xl-community-correction-info/exportExcel`, params)
const getTemplateCorrection = (params) => getAction(`/xl-community-correction-info/importTemplate`, params)

//吸毒人员
const getListPoison = (params) => getAction(`/drug/list`, params)
const getInfoPoison = (params) => getAction(`/drug/information/`+params)
const getSpecialInformationPoison = (params) => getAction(`/drug/specialInformation/`+params)
const getRecordsPoison = (params) => getAction(`/drug/records/`+params)
const exportPoison = (params) => downFile(`/drug/exportExcel`, params)
const getTemplatePoison = (params) => getAction(`/drug/importTemplate`, params)

//艾滋病危险人员
const getListAids = (params) => getAction(`/aids/listRelease`, params)
const getInfoAids = (params) => getAction(`/aids/info`, params)
const exportAids = (params) => downFile(`/aids/exportAll`, params)

//肇事肇祸等严重精神障碍患者
const getListSpirituality = (params) => getAction(`/mental_disorder/list`, params)
const getInfoSpirituality = (params) => getAction(`/mental_disorder/information/`+ params)
const getSpecialInformationSpirituality = (params) => getAction(`/mental_disorder/special/`+ params)
const getControlSpirituality = (params) => getAction(`/mental_disorder/control/`+ params)
const exportSpirituality = (params) => downFile(`/mental_disorder/exportExcel`, params)
const getTemplateSpirituality = (params) => getAction(`/mental_disorder/importTemplate`, params)

//重点青少年
const getListYouth = (params) => getAction(`/key-youth/list`, params)
const getInfoYouth = (params) => getAction(`/key-youth/information/`+params)
const getYouthCauses = (params) => getAction(`/key-youth/causes/`+params)
const getInfoYouthId = (params) => getAction(`/key-youth/info/`+params)
const exportYout = (params) => downFile(`/key-youth/exportExcel`, params)
const getTemplateYouth = (params) => getAction(`/key-youth/importTemplate`, params)

//告警信息、处置信息
const getAlarm = (params) => getAction(`/xl-special-personnel-alarm-info/getDispose`, params)
const fillInAlarm = (params) => postAction(`/xl-special-personnel-alarm-info/fillIn`, params)
const getDisposal = (params) => getAction(`/xl-special-personnel-dispose/getDispose`, params)
const addDisposal = (params) => postAction(`/xl-special-personnel-dispose/saveDispose`, params)
const updateDisposal = (params) => postAction(`/xl-special-personnel-dispose/updateDispose`, params)
const deleteDisposal = (params) => deleteAction(`/xl-special-personnel-dispose/deleteDispose/`+params)

//特殊人员-更换头像
const changeAvatar = (params) => postAction(`/xl-special-personnel/changeAvatar`, params)

export {
  getListRelease,
  getInfoRelease,
  getEducationInfoRelease,
  exportRelease,
  getTempletExcel,
  getListCorrection,
  getInfoCorrection,
  getCommunityCorrectionInfo,
  exportCorrection,
  getTemplateCorrection,
  getListPoison,
  getInfoPoison,
  getSpecialInformationPoison,
  getRecordsPoison,
  exportPoison,
  getTemplatePoison,
  getListAids,
  getInfoAids,
  exportAids,
  getListSpirituality,
  getInfoSpirituality,
  getSpecialInformationSpirituality,
  getControlSpirituality,
  exportSpirituality,
  getTemplateSpirituality,
  getListYouth,
  getInfoYouth,
  getYouthCauses,
  getInfoYouthId,
  exportYout,
  getTemplateYouth,
  getAlarm,
  fillInAlarm,
  getDisposal,
  addDisposal,
  updateDisposal,
  deleteDisposal,
  changeAvatar
}
